package org.suk.dp.abstractFactory;

import org.suk.dp.abstractFactory.dao.DepartmentDao;
import org.suk.dp.abstractFactory.dao.UserDao;
import org.suk.dp.abstractFactory.factory.AccessFactory;
import org.suk.dp.abstractFactory.factory.Factory;
import org.suk.dp.abstractFactory.factory.SqlServerFactory;
import org.suk.dp.abstractFactory.model.Department;
import org.suk.dp.abstractFactory.model.User;

/**
 * Description: <br/>
 * @version V1.0  2017/6/21 11:04  by 石冬冬(dongdong.shi@ucarinc.com) - Heil Hitler
 */
public class Client {
    public static void main(String[] args) {
        User user = new User(1,"笛卡尔");
        Department department = new Department(1,"人力资源管理");
        Factory factory = new SqlServerFactory();

        UserDao userDao = factory.createUserDao();
        userDao.insert(user);
        userDao.query(1);

        DepartmentDao departmentDao = factory.createDepartmentDao();
        departmentDao.insert(department);
        departmentDao.query(1);
    }
}
